﻿define([

], function () {

    var Model = Backbone.Model.extend({
        list: function (id, callbackOk) {
            send("solution/List", { userId: id }, null, callbackOk);
        },
        getSolution: function (id, callbackOk) {
            send("solution/Get/" + id, null, null, callbackOk);
        },
        update: function (solution, callbackOk) {
            send("solution/Update", solution, { type: "PUT" }, callbackOk);
        },
        create: function (solution, callbackOk, callbackError) {
            send("solution/Create", solution, { type: "POST" }, callbackOk, callbackError);
        },
        deleteData: function (id, callbackOk) {
            send("solution/Delete/" + id, null, { type: "DELETE" }, callbackOk);
        }
    });
    return Model;
});